import request from '@/utils/request'

// 获取用户基本信息
export const getrole = (pageIndex, pageSize) => request.get('/api/user-service/user/search', {
  params: {
    pageIndex,
    pageSize
  }
})

// 删除数据
export const deleteservice = id => request.delete(`/api/user-service/user/${id}`)

//  新增人员
export const postservice = data => request.post('/api/user-service/user', data)

//  修改人员
export const putservice = data => request.put(`/api/user-service/user/${data.id}`, data)

//  获取角色列表
export const getservice = () => request.get('/api/user-service/role')

//  获取区域列表
export const getsearch = () => request.get('/api/vm-service/region/search?pageIndex=1&pageSize=100000')

// 图片上传
export const postsku = () => request.post('/api/vm-service/sku/fileUpload')

// ****************************       第三页面       ****************************
// 人员工作量列表
export const postsearchUserWorksku = data => request.get('/api/user-service/user/searchUserWork', {
  params: { ...data }
})

// 获取用户工作量(工单统计)
export const gettask = data => request.get('/api/task-service/task/userWork', {
  params: { ...data }
})

// 获取当时工单汇总信息(人员统计头部信息)
export const taskReportInfo = data => request.get(`/api/task-service/task/taskReportInfo/${data.start}/${data.end}`)

//  排行榜
export const taskTop10 = data => request.get(`/api/task-service/task/userWorkTop10/${data.start}/${data.end}/${data.isRepair}/${data.regionId}`)
